import request from '/@/utils/request';

// 查询代理列列表
export function listCompany(query?: Object) {
  return request({
    url: '/module/company/list',
    method: 'get',
    params: query
  })
}

// 查询代理列详细
export function getCompany(id?: number) {
  return request({
    url: '/module/company/' + id,
    method: 'get'
  })
}

// 新增代理列
export function addCompany(data?: Object) {
  return request({
    url: '/module/company',
    method: 'post',
    data: data
  })
}

// 修改代理列
export function updateCompany(data?: Object) {
  return request({
    url: '/module/company',
    method: 'put',
    data: data
  })
}

// 删除代理列
export function delCompany(id?: number) {
  return request({
    url: '/module/company/' + id,
    method: 'delete'
  })
}

// 导出代理列
export function exportCompany(query?: Object) {
  return request({
    url: '/module/company/export',
    method: 'get',
    params: query
  })
}
